//
//  ClassifyDetailsCell.m
//  UI_xiangmu
//
//  Created by dlios on 15-4-24.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "ClassifyDetailsCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation ClassifyDetailsCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.classifyDetView = [[UIView alloc] init];
        [self.contentView addSubview:self.classifyDetView];
        [_classifyDetView release];
        //**********
        self.classifyDetBookNameLabel = [[UILabel alloc] init];
       
        [self.classifyDetView addSubview:self.classifyDetBookNameLabel];
        [_classifyDetBookNameLabel release];
        //***********
        self.classifyDetBookDescriptionLabel = [[UILabel alloc] init];
               self.classifyDetBookDescriptionLabel.numberOfLines = 5;
        [self.classifyDetView addSubview:self.classifyDetBookDescriptionLabel];
        [_classifyDetBookDescriptionLabel release];
        //***********
        self.classifyDetBookIconOtherURLImageView = [[UIImageView alloc] init];
        self.classifyDetBookIconOtherURLImageView.layer.borderWidth = 0.5;
        self.classifyDetBookIconOtherURLImageView.layer.cornerRadius = 5;
        [self.classifyDetView addSubview:self.classifyDetBookIconOtherURLImageView];
        [_classifyDetBookIconOtherURLImageView release];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    self.classifyDetView.frame = CGRectMake(0, 0, WIDTH, HEIGHT / 20 * 19);
    self.classifyDetBookNameLabel.frame = CGRectMake(WIDTH / 3+5, 0, WIDTH / 3 * 2-10, HEIGHT / 4);
    self.classifyDetBookDescriptionLabel.frame = CGRectMake(WIDTH / 3+5, HEIGHT / 4, WIDTH / 3 * 2-10, HEIGHT / 20 * 14);
    self.classifyDetBookIconOtherURLImageView.frame = CGRectMake(5, 0, WIDTH / 3 - 5, HEIGHT / 20 * 19);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
